﻿<UserControl x:Class="GooNews.Controls.NewsPageControl"
             xmlns:tk="clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone.Controls.Toolkit"
             xmlns:ctrls="clr-namespace:GooNews.Controls"
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
             mc:Ignorable="d"
             FontFamily="{StaticResource PhoneFontFamilyNormal}"
             FontSize="{StaticResource PhoneFontSizeNormal}"
             Foreground="{StaticResource PhoneForegroundBrush}"
             d:DesignHeight="480"
             d:DesignWidth="480">
  <UserControl.Resources>
    <DataTemplate x:Key="itemTemplate">
      <ctrls:NewsItemControl MessageSent="NewsItemControl_MessageSent" />
    </DataTemplate>
  </UserControl.Resources>
  <Grid>
    <TextBlock Text="{Binding ErrorMessage}"
               TextAlignment="Center"
               FontSize="{StaticResource PhoneFontSizeMedium}"
               Foreground="{StaticResource appAccentBrush}" />
    <TextBlock Text="No News Items Found"
               TextAlignment="Center"
               Visibility="{Binding IsFeedEmpty, Converter={StaticResource visCvt}}"
               FontSize="{StaticResource PhoneFontSizeMedium}"
               Foreground="{StaticResource appAccentBrush}" />
    <ListBox ItemsSource="{Binding FeedItems}"
             Foreground="{StaticResource foreBrush}"
             ItemTemplate="{StaticResource itemTemplate}"
             ItemContainerStyle="{StaticResource StrechyItemStyle}"
             tk:TiltEffect.IsTiltEnabled="True" />
    <ctrls:BusyPane Visibility="{Binding IsBusy, Converter={StaticResource visCvt}}"
                    ObscuredBrush="Transparent"
                    d:IsHidden="True"
                    d:IsLocked="True" />
  </Grid>
</UserControl>
